//api文件仍保留但不建议使用，推荐使用models中的api。API files remain preserved (deprecated), use models APIs instead.
import type { UserView, UserViewResponse } from './types.js';

import { requestClient } from '#/api/request';

export const getuctooUserViewList = async (page: number, pageSize: number,
  searchParams?: any) => {
  return requestClient.get<UserViewResponse>(`/uctoo/user_view/${pageSize}/${page}`,{
    params: searchParams,
  });
};

export const getuctooUserView = async (id: string) => {
  return requestClient.get<UserView>(`/uctoo/user_view/${id}`);
};

export const adductooUserView = async (data: Partial<UserView>) => {
  return requestClient.post<UserView>('/uctoo/user_view/add', data);
};

export const edituctooUserView = async (data: Partial<UserView>) => {
  return requestClient.post<UserView>('/uctoo/user_view/edit', data);
};

export const deleteuctooUserView = async (id: string) => {
  return requestClient.post<any>('/uctoo/user_view/del', { id });
};
